package net.ikenway.springboot.demo.Service.Interface;

import net.ikenway.springboot.demo.Model.Dto.UserDto;
import net.ikenway.springboot.demo.Model.Entity.User;

import javax.persistence.EntityNotFoundException;
import java.util.List;

/**
 * @author MasterKenway <zk@ikenway.net>
 * @Description
 * @date Created Date 12/10/2020
 */


public interface UserServiceIntf {
    public List<UserDto> findAll();

    public User findByUsername(String username);

    public UserDto create(User user);

    /**
     * 获取用户个人信息
     *
     * @return
     */
    public UserDto getUserInfo();

    /**
     * 更新用户信息
     *
     * @param userDto
     * @return
     */
    public UserDto update(UserDto userDto) throws NoSuchFieldException;

    public void enable(List<Long> userIds);

    /**
     * 关闭账号
     *
     * @return
     */
    public void disable(List<Long> userIds) throws Exception;

    /**
     * 注销账号
     *
     * @return
     */
    public void delete() throws Exception;

    public User exitsOrNot(Long userId) throws EntityNotFoundException;

}
